import http from "@/utils/http";

// 新增客户端账号
export function acc_addCustomer(params) {
  return http.post("/app-account/addCustomer", params);
}
// 查询现有销售组
export function acc_getSpeInfo(params) {
  return http.get("/app-account/getSpeInfo", params);
}
// 账号配置仓库
export function acc_addCrsHouse(params) {
  return http.post("/sys-store-house/addCrsHouse", params);
}
// 查询客服组
export function acc_csd() {
  return http.get("/sys-team/csd");
}
//账号列表查需
// 账号列表
export function pageAccount_List(params) {
  return http.post("/app-account/pageAccount", params);
}

//权限树
export function sysRole_tree(params) {
  return http.get("/sys-permission/allTree/" + params);
}
//新增权限
export function addCustomer_perm(url, params) {
  return http.post("/app-account/add-customer-Perm/" + url, params);
}
//账号详情
export function getRoPer(params) {
  return http.get("/app-account/getRoPer/" + params);
}

//修改密码
export function editPwd(params) {
  return http.put("/app-account/editPwd", params);
}

//查询未添加的物流平台
export function con_searchNoPlat(tenantId, params) {
  return http.post("/sys-logistics-tenant/select/not/list/" + tenantId, params);
}
//查询未添加的物流平台
export function con_searchYesPlat(tenantId, params) {
  return http.post(
    "/sys-logistics-tenant/select/page/list/" + tenantId,
    params
  );
}
//添加的物流平台
export function con_addPlat(tenantId, params) {
  return http.post("/sys-logistics-tenant/save/not/list/" + tenantId, params);
}
//物流平台的开启与禁用
export function con_platIsDisable(sysLogisticsTenantId, tenantId, params) {
  return http.post(
    "/sys-logistics-tenant/edit/not/list/" +
    sysLogisticsTenantId +
    "/" +
    tenantId,
    params
  );
}
//查询未添加的物流商
export function con_searchNotProList(
  sysLogisticsTenantId,
  sysLogisticsId,
  tenantId
) {
  return http.post(
    "/sys-logistics-service-item-tenant/select/notAdd/" +
    sysLogisticsTenantId +
    "/" +
    sysLogisticsId +
    "/" +
    tenantId
  );
}
//查询已添加的物流商
export function con_searchYesProList(
  sysLogisticsTenantId,
  sysLogisticsId,
  tenantId
) {
  return http.post(
    "/sys-logistics-service-item-tenant/select/AllAddNotAdd/" +
    sysLogisticsTenantId +
    "/" +
    sysLogisticsId +
    "/" +
    tenantId
  );
}

//确认添加物流商
export function con_addProList(
  sysLogisticsTenantId,
  sysLogisticsId,
  tenantId,
  serviceItemId
) {
  return http.post(
    "/sys-logistics-service-item-tenant/save/info/" +
    sysLogisticsTenantId +
    "/" +
    sysLogisticsId +
    "/" +
    tenantId +
    "/" +
    serviceItemId
  );
}
//物流商是否启用询价和打单
export function con_editProList(sysLogisticsId, serviceItemTenantId, params) {
  return http.post(
    "/sys-logistics-service-item-tenant/enable/" +
    sysLogisticsId +
    "/" +
    serviceItemTenantId,
    params
  );
}
//查询未添加的服务方式
export function con_searchSerList(
  sysLogisticsId,
  serviceItemTenantId,
  sysLogisticsServiceItemId,
  tenantId
) {
  return http.post(
    "/sys-logistics-service-way-tenant/select/not/add/" +
    sysLogisticsId +
    "/" +
    serviceItemTenantId +
    "/" +
    sysLogisticsServiceItemId +
    "/" +
    tenantId
  );
}
//确认添加服务方式
export function con_addSerProWay(
  sysLogisticsId,
  serviceItemTenantId,
  sysLogisticsServiceItemId,
  tenantId,
  params
) {
  return http.post(
    "/sys-logistics-service-way-tenant/add/" +
    sysLogisticsId +
    "/" +
    serviceItemTenantId +
    "/" +
    sysLogisticsServiceItemId +
    "/" +
    tenantId,
    params
  );
}
//服务方式启用和禁用
export function con_editSerProList(
  sysLogisticsServiceWayTenantId,
  sysLogisticsServiceWayId,
  revision,
  isDisable
) {
  return http.post(
    "/sys-logistics-service-way-tenant/enable/" +
    sysLogisticsServiceWayTenantId +
    "/" +
    sysLogisticsServiceWayId +
    "/" +
    revision +
    "/" +
    isDisable
  );
}
